package jzqb.controller;

//import haha.life.common.JSYYEnum;
import io.swagger.annotations.Api;
import jzqb.bo.JSYYTypeBo;
import jzqb.bo.YQTJSYYFLBO;
import jzqb.bo.ZTWXBo;
import jzqb.common.Result;
import jzqb.po.YQTJSYYFLPo;
import jzqb.service.JSYYFLService;
import jzqb.service.ZTWXService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/ztwx")
@Api(tags = "专题文献")
public class ZTWXController {

    @Autowired
    ZTWXService ztwxService;

    @Autowired
    JSYYFLService jsyyflService;


    @PostMapping("/searchResult")
    public Result getResultDetail(@RequestBody ZTWXBo ztwxBo) {
        Result result = ztwxService.searchResult(ztwxBo);
        return result;
    }

    @PostMapping("/getDetail")
    public Result getDetail(@RequestBody ZTWXBo ztwxBo) {
       Result result = ztwxService.getDetail(ztwxBo);
        return result;
    }

    @GetMapping("/getClassFy")
    public Result getClassFy() {
        List<YQTJSYYFLBO> list =jsyyflService.getClassFy();
        return Result.succ(list);
    }
}
